package com.show.dao.grid_owner;


import com.show.dto.grid_owner.GridOwner;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

/**
 * Created by yxd on 2018/1/30.
 */
public interface GridOwnerRepositoty extends JpaRepository<GridOwner, String>, JpaSpecificationExecutor<GridOwner>, PagingAndSortingRepository<GridOwner, String> {

    @Modifying
    @Query(value = "delete from grid_owner where grid_id=?",nativeQuery = true)
    void delete(String gridId);
}
